import { fileURLToPath, URL } from "node:url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import vueDevTools from "vite-plugin-vue-devtools";

// https://vite.dev/config/
export default defineConfig({
  publicDir: "E:\\Projects\\WebProjects\\flyingeye-native\\dist",
  plugins: [vue(), vueJsx(), vueDevTools()],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url))
    }
  },
  server: {
    host: "localhost",
    port: 44388,
    https: {
      cert: "certificate.crt",
      key: "private.key"
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        // 'modern-compiler' 指的是 Sass 的现代编译器 API，它提供了更好的性能和功能。
        api: "modern-compiler"
      }
    }
  }
});
